package com.hello.system.service.impl;

import java.util.List;
import com.hello.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hello.system.mapper.FishTestVideoMapper;
import com.hello.system.domain.FishTestVideo;
import com.hello.system.service.IFishTestVideoService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 测试视频管理Service业务层处理
 * 
 * @author hello
 * @date 2025-08-15
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class FishTestVideoServiceImpl extends ServiceImpl<FishTestVideoMapper, FishTestVideo> implements IFishTestVideoService 
{
    private final FishTestVideoMapper fishTestVideoMapper;

    /**
     * 查询测试视频管理
     * 
     * @param videoId 测试视频管理主键
     * @return 测试视频管理
     */
    @Override
    public FishTestVideo selectFishTestVideoByVideoId(Long videoId)
    {
        return fishTestVideoMapper.selectFishTestVideoByVideoId(videoId);
    }

    /**
     * 查询测试视频管理列表
     * 
     * @param fishTestVideo 测试视频管理
     * @return 测试视频管理
     */
    @Override
    public List<FishTestVideo> selectFishTestVideoList(FishTestVideo fishTestVideo)
    {
        return fishTestVideoMapper.selectFishTestVideoList(fishTestVideo);
    }

    /**
     * 新增测试视频管理
     * 
     * @param fishTestVideo 测试视频管理
     * @return 结果
     */
    @Override
    public int insertFishTestVideo(FishTestVideo fishTestVideo)
    {
        fishTestVideo.setCreateTime(DateUtils.getNowDate());
        return fishTestVideoMapper.insertFishTestVideo(fishTestVideo);
    }

    /**
     * 修改测试视频管理
     * 
     * @param fishTestVideo 测试视频管理
     * @return 结果
     */
    @Override
    public int updateFishTestVideo(FishTestVideo fishTestVideo)
    {
        fishTestVideo.setUpdateTime(DateUtils.getNowDate());
        return fishTestVideoMapper.updateFishTestVideo(fishTestVideo);
    }


    /**
     * 批量删除测试视频管理
     * 
     * @param videoIds 需要删除的测试视频管理主键
     * @return 结果
     */
    @Override
    public int deleteFishTestVideoByVideoIds(Long[] videoIds)
    {
        return fishTestVideoMapper.deleteFishTestVideoByVideoIds(videoIds);
    }

    /**
     * 删除测试视频管理信息
     * 
     * @param videoId 测试视频管理主键
     * @return 结果
     */
    @Override
    public int deleteFishTestVideoByVideoId(Long videoId)
    {
        return fishTestVideoMapper.deleteFishTestVideoByVideoId(videoId);
    }
}
